<%@ Page Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true"
    CodeFile="RecursosIvaAsignados.aspx.cs" Inherits="RecursosIvaAsignados" Title="Untitled Page" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3.Export, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
    
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="iva">
        Recursos IVA Asignados</h1>
    <dxwgv:ASPxGridView ID="gidvRecursosIva" runat="server" AutoGenerateColumns="False"
        KeyFieldName="IRA_ID" Width="100%" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
        CssPostfix="PlasticBlue" OnRowDeleting="gidvRecursosIva_RowDeleting" OnRowInserting="gidvRecursosIva_RowInserting"
        OnRowUpdating="gidvRecursosIva_RowUpdating" OnRowValidating="gidvRecursosIva_RowValidating">
        <Columns>
            <dxwgv:GridViewCommandColumn VisibleIndex="0">
                <EditButton Text="Editar" Visible="True">
                </EditButton>
                <NewButton Text="Nuevo" Visible="True">
                </NewButton>
                <DeleteButton Text="Borrar" Visible="True">
                </DeleteButton>
                <CancelButton Text="Cancelar">
                </CancelButton>
                <UpdateButton Text="Guardar">
                </UpdateButton>
                <ClearFilterButton Text="Limpiar" Visible="True">
                </ClearFilterButton>
            </dxwgv:GridViewCommandColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IRA_ID" ReadOnly="True" Visible="False"
                VisibleIndex="1">
                <EditFormSettings Visible="False" />
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Valor" FieldName="IRA_VALOR" VisibleIndex="1">
                <PropertiesTextEdit DisplayFormatString="{0:N0}">
                </PropertiesTextEdit>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataComboBoxColumn Caption="Departamento" FieldName="ZON_ID" VisibleIndex="2">
                <PropertiesComboBox DataSourceID="SqlDataSourceBasZonasGeograficas" TextField="ZON_NOMBREBAS_ZONAS_GEOGRAFICAS"
                    ValueField="ZON_ID" ValueType="System.String">
                </PropertiesComboBox>
            </dxwgv:GridViewDataComboBoxColumn>
            <dxwgv:GridViewDataTextColumn FieldName="ZON_ID" Visible="False" VisibleIndex="4">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataComboBoxColumn Caption="Vigencia" FieldName="IVI_ID" VisibleIndex="3">
                <PropertiesComboBox DataSourceID="SqlDataSourceVigencias" TextField="IVI_NOMBREIVA_VIGENCIA"
                    ValueField="IVI_ID" ValueType="System.String">
                </PropertiesComboBox>
            </dxwgv:GridViewDataComboBoxColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IVI_ID" Visible="False" VisibleIndex="4">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Convenios" FieldName="IRA_CONVENIOS" VisibleIndex="4">
                <PropertiesTextEdit DisplayFormatString="{0:N0}">
                </PropertiesTextEdit>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Asignado" FieldName="IRA_ASIGNADO" VisibleIndex="5">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Rendimientos" FieldName="IRA_RENDIMIENTOS"
                VisibleIndex="6">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataMemoColumn Caption="Nota" FieldName="IRA_NOTA" VisibleIndex="7">
                <PropertiesMemoEdit Height="200px">
                </PropertiesMemoEdit>
            </dxwgv:GridViewDataMemoColumn>
            <dxwgv:GridViewDataTextColumn Caption="Reintegros" FieldName="IRA_REINTEGROS" VisibleIndex="8">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Reintegros Rendimientos" FieldName="IRA_REINTEGROS_RENDIMIENTOS"
                VisibleIndex="9">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Reintegros otros" FieldName="IRA_REINTEGROS_OTROS"
                VisibleIndex="10">
            </dxwgv:GridViewDataTextColumn>
        </Columns>
        <TotalSummary>
            <dxwgv:ASPxSummaryItem DisplayFormat="{0:N2}" FieldName="IRA_VALOR" SummaryType="Sum" />
        </TotalSummary>
        <Settings ShowGroupPanel="True" ShowFilterRow="True" ShowFooter="True"></Settings>
        <SettingsText Title="Contratos" GroupPanel="Arrastre el encabezado de la columna  aqui para agrupar por columna" />
        <SettingsPager ShowDefaultImages="False" AlwaysShowPager="True">
            <AllButton Text="All" Visible="True">
            </AllButton>
            <NextPageButton Text="Next &gt;">
            </NextPageButton>
            <PrevPageButton Text="&lt; Prev">
            </PrevPageButton>
        </SettingsPager>
        <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
            <Header ImageSpacing="10px" SortingImageSpacing="10px">
            </Header>
           
        </Styles>
        <SettingsBehavior ColumnResizeMode="Control" />
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <StylesEditors>
            <CalendarHeader Spacing="11px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>
    </dxwgv:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSourceBasZonasGeograficas" runat="server" ConnectionString="<%$ ConnectionStrings:MCSIGConnectionString %>"
        SelectCommand="SELECT ZON_ID, ZON_NOMBRE AS ZON_NOMBREBAS_ZONAS_GEOGRAFICAS FROM BAS_ZONAS_GEOGRAFICAS WHERE (SUBSTRING(ZON_ID, 0, 3) = ZON_ID)">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSourceVigencias" runat="server" ConnectionString="<%$ ConnectionStrings:MCSIGConnectionString %>"
        SelectCommand="SELECT IVI_ID, IVI_NOMBRE AS IVI_NOMBREIVA_VIGENCIA FROM IVA_VIGENCIA">
    </asp:SqlDataSource>
    <dxwgv:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="gidvRecursosIva">
    </dxwgv:ASPxGridViewExporter>
    <asp:Button ID="btnXlsExport" runat="server" CssClass="button m tp-space10" OnClick="btnXlsExport_Click"
        Text="Exportar a XLS" />
</asp:Content>
